//
//  TG_Vaildate.h
//  TongGuanLease
//
//  Created by 张奇 on 2022/4/12.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN
/**
 * 判断空字符串 YES 返回YES为空
 */
#define  EmptyCheck(A)  ([TG_Vaildate isEmptyString:A])

@interface TG_Vaildate : NSObject
/**
 *  纯数字
 */
+ (BOOL)isPureInt:(NSString *)str;

/**
 限制数字输入
 */
+(BOOL)isMatchNumFormat:(UITextField *)textField range:(NSRange)range string:(NSString *)string maxLength:(NSInteger)maxLength;

/**
 禁止数字输入
 */
+(BOOL)isForbidNumFormat:(UITextField *)textField range:(NSRange)range string:(NSString *)string maxLength:(NSInteger)maxLength;
/**
 限制金额格式输入
 */
+ (BOOL)isMatchMoneyFormat:(UITextField *)textField range:(NSRange)range string:(NSString *)strin;

/**
 限制小时数格式输入
 */
+(BOOL)isMatchHourFormat:(UITextField *)textField range:(NSRange)range string:(NSString *)string;

/**
 限制身份证输入
 */
+ (BOOL)isMatchIdCardFormat:(UITextField *)textField range:(NSRange)range string:(NSString *)strin;

/**
 限制中文输入
 */
+ (BOOL)isMatchChineseFormat:(UITextField *)textField range:(NSRange)range string:(NSString *)strin;

/**
 *  纯字母
 */
+ (BOOL)isPureLetter:(NSString *)str;

/**
 *  只有数字字母和中文
 */
+ (BOOL)isMatchNumberWordChinese:(NSString *)str;

/**
 *  将中文替换调
 */
+ (NSString *)replaceChineseWithEmptyChar:(NSString *)str;

/**
 *  有中文
 */
+ (BOOL)hasChinese:(NSString *)str;

/**
 *  是否从appstore下载的
 */
+ (BOOL)isInstallFromAppStore;

/**
 *  是否越狱
 */
+ (BOOL)isJailBreak;

/**
 *  手机号码验证
 */
+ (BOOL)validateMobile:(NSString *)mobileStr;

/**
 *  邮箱
 */
+ (BOOL)validateEmail:(NSString *)emailStr;

/**
 *  字符是否是空
 */
+(BOOL)isEmptyString:(NSString*)string;
+(BOOL)isURLPrefix:(NSString*)string;
+(BOOL)isIdCard:(NSString *)card;

/**银行卡证号效验*/
+ (BOOL) checkCardNo:(NSString*) cardNo;
/**
 *  判断密码是否是6位以上数字字母
 */
+(BOOL)judgePassWordLegal:(NSString *)pass;


+(BOOL)checkCarNumber:(NSString *)number;
+(BOOL)verifyVIN:(NSString *)vin;

+(BOOL)isVideo:(NSString *)url;

@end

NS_ASSUME_NONNULL_END
